package Bk.basic;

public class P20 {

	public static void main(String[] args) {

		//17
/*		int n = 3; n++;
		System.out.println("n==" +n);
		n--;
		System.out.println("n=="+ n);*/
		
		//18	
//		System.out.println("2+2 = " + (2+2));
//		System.out.println("2+2 = " +2+2);
		
/*		//19
		char a,b;
		a='b';
		System.out.println(a);
		b='c';
		System.out.println(b);
		a=b;
		System.out.println(a);*/
			
		//20
//		int n = 1;
//		int k = 2;
//		int r = n;
//		if (k<n){r= k;}
//		System.out.println("가. " + r);
		
//		int n = 1;
//		int k = 2;
//		int r;
//		if (n<k){r = k;}
//		else r= k +n;
//		System.out.println("나. " + r);
		
//		int n = 1;
//		int k = 2;
//		int r = k;
//		if (r<k) {n = r;}
//		else r = k + n;
//		System.out.println("다. " + r);
		
//		int n = 1;
//		int k = 2;
//		int r = 3;
//		if (r<n+k) {r = 2*n;}
//		else k = 2*r;
//		System.out.println("라. " + r);

		
		//21
/*		if ( x && y == 0){x=1; y=1;}   //
		System.out.println("가. "  );
		if (1<=x && x<=10){}
		System.out.println("나. " + x);*/
		
		//22
		//가.
//		int number = 30;
//		if ( number % 2 == 0){System.out.println(number + " is even.");}
//		if ( number % 2 == 0){System.out.println(number + " is odd.");}
		//나.		
//		int number = 35;
//		if ( number % 2 == 0){System.out.println(number + "is even.");}
//		else System.out.println(number + "is odd.");
		
		//23
		//가.
		int x =3;
		int y =2;
		int z;
		if (x>2){
		if (y>2){z=x+y; System.out.println("z is" + z);}
		}
		else System.out.println("x is " + x);
		
		//나.
//		int x = 3;
//		int y = 4;
//		int z;
//		if (x>2){
//			if (y>2){z=x+y; System.out.println("z is" + z);}
//			}
//		else System.out.println("x is " + x);
		
		//다.
//		int x= 2;
//		int y= 2;
//		int z;
//		if (x>2){
//			if (y>2){z=x+y; System.out.println("z is" + z);}
//			}
//		else System.out.println("x is " + x);
		
		//24.
		//가.
//		int a=3;
//		if (++a==3){System.out.println("Three");}    // a++를 ++a로 변경
//		else System.out.println("Four");

		//나.
//		int a=3;
//		if(++a==3){System.out.println("Three");}
//		else System.out.println("Four");           //Three 를 Four 로 변경
		
		//다.
//		int a=3; a= ++a;                          //a++ 를 ++a로 변경
//		if(a==3){System.out.println("Three");}
//		else System.out.println("Four");
		
		
		
		
	}

}
